From 622e82cde16725c7d81bdc1dde3693dfbc613b5b Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sun, 30 Oct 2005 23:30:41 +0100 Subject: [PATCH] Remove stupid unused strtok() function. Signed-off-by: Keir Fraser --- xen/common/string.c | 42 ---------------------------------------- xen/include/xen/string.h | 2 -- 2 files changed, 44 deletions(-) diff --git a/xen/common/string.c b/xen/common/string.c index 7c6e74df7e..df8874c298 100644 --- a/xen/common/string.c +++ b/xen/common/string.c @@ -4,17 +4,6 @@ * Copyright (C) 1991, 1992 Linus Torvalds */ -/* - * stupid library routines.. The optimized versions should generally be found - * as inline code in - * - * These are buggy as well.. - * - * * Fri Jun 25 1999, Ingo Oeser - * - Added strsep() which will replace strtok() soon (because strsep() is - * reentrant and should be faster). Use only strsep() in new code, please. - */ - #include #include #include @@ -52,8 +41,6 @@ int strnicmp(const char *s1, const char *s2, size_t len) } #endif -char * ___strtok; - #ifndef __HAVE_ARCH_STRCPY /** * strcpy - Copy a %NUL terminated string @@ -316,35 +303,6 @@ char * strpbrk(const char * cs,const char * ct) } #endif -#ifndef __HAVE_ARCH_STRTOK -/** - * strtok - Split a string into tokens - * @s: The string to be searched - * @ct: The characters to search for - * - * WARNING: strtok is deprecated, use strsep instead. - */ -char * strtok(char * s,const char * ct) -{ - char *sbegin, *send; - - sbegin = s ? s : ___strtok; - if (!sbegin) { - return NULL; - } - sbegin += strspn(sbegin,ct); - if (*sbegin == '\0') { - ___strtok = NULL; - return( NULL ); - } - send = strpbrk( sbegin, ct); - if (send && *send != '\0') - *send++ = '\0'; - ___strtok = send; - return (sbegin); -} -#endif - #ifndef __HAVE_ARCH_STRSEP /** * strsep - Split a string into tokens diff --git a/xen/include/xen/string.h b/xen/include/xen/string.h index 0c6dd612ad..ef6b4a5d46 100644 --- a/xen/include/xen/string.h +++ b/xen/include/xen/string.h @@ -9,9 +9,7 @@ extern "C" { #define __kernel_size_t size_t -extern char * ___strtok; extern char * strpbrk(const char *,const char *); -extern char * strtok(char *,const char *); extern char * strsep(char **,const char *); extern __kernel_size_t strspn(const char *,const char *); -- 2.30.2